home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / DHTML - Document Effects / left-right-stripy.izs < prev    next >
Text File  |  2005-08-31  |  5KB  |  194 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>Left-Right Stripy Curtain Script
  4. <!/TITLE>
  5.  
  6. <!BROWSER>FF1+ IE5+ Opr7+<!/BROWSER>
  7.  
  8. <!DESCRIPTION>A script that opens up a blue "curtain" (sideways) as the surfer enters the page.
  9. <!/DESCRIPTION> 
  10.  
  11. <!CATEGORY>document effects<!/CATEGORY>
  12.  
  13. <!SCRIPT>
  14. <!-- START OF SCRIPT -->
  15. <!-- Step 1: Insert the following into the <head> section of your page. You can change the color of the strips from blue to another by changing all three instances of the word "blue" to another color name:-->
  16. <style>
  17. <!--
  18. .intro{
  19. position:absolute;
  20. left:0;
  21. top:0;
  22. layer-background-color:blue;
  23. background-color:blue;
  24. border:0.1px solid blue;
  25. z-index:10;
  26. }
  27. -->
  28. </style>
  29. <!--Step 2: Finally, insert the below right after the <body> tags, before anything else. You can adjust the speed in which the curtain "draws' by changing "speed=20" in the second line to another number (greater is faster):-->
  30. <div id="i1" class="intro"></div><div id="i2" class="intro"></div><div id="i3"
  31. class="intro"></div><div id="i4" class="intro"></div><div id="i5" class="intro"></div><div
  32. id="i6" class="intro"></div><div id="i7" class="intro"></div><div id="i8" class="intro"></div>
  33. <script language="JavaScript1.2">
  34.  
  35. /*
  36. Left-Right Stripy Curtain Script- ⌐ Dynamic Drive (www.dynamicdrive.com)
  37. For full source code, 100's more free DHTML scripts, and TOS,
  38. visit http://www.dynamicdrive.com
  39. */
  40.  
  41. var ns4=document.layers?1:0
  42. var ie4=document.all?1:0
  43. var ns6=document.getElementById&&!document.all?1:0
  44.  
  45. var speed=20
  46. var temp=new Array()
  47. var temp2=new Array()
  48. if (ns4){
  49. for (i=1;i<=8;i++){
  50. temp[i]=eval("document.i"+i+".clip")
  51. temp2[i]=eval("document.i"+i)
  52. temp[i].width=window.innerWidth
  53. temp[i].height=window.innerHeight/8
  54. temp2[i].top=(i-1)*temp[i].height
  55. }
  56. }
  57. else if (ie4||ns6){
  58. var clipright=ns6?window.innerWidth:document.body.clientWidth
  59. clipleft=0
  60. for (i=1;i<=8;i++){
  61. temp[i]=ns6?document.getElementById("i"+i).style:eval("document.all.i"+i+".style")
  62. temp[i].width=ns6?window.innerWidth-15:document.body.clientWidth
  63. temp[i].height=ns6?window.innerHeight/8:document.body.offsetHeight/8
  64. temp[i].top=(i-1)*parseInt(temp[i].height)
  65. }
  66. }
  67. function openit(){
  68. window.scrollTo(0,0)
  69. if (ns4){
  70. for (i=1;i<=8;i=i+2)
  71. temp[i].right-=speed
  72. for (i=2;i<=8;i=i+2)
  73. temp[i].left+=speed
  74. if (temp[2].left>window.innerWidth)
  75. clearInterval(stopit)
  76. }
  77. else if (ie4||ns6){
  78. clipright-=speed
  79. for (i=1;i<=8;i=i+2){
  80. temp[i].clip="rect(0 "+clipright+" auto 0)"
  81. }
  82. clipleft+=speed
  83. for (i=2;i<=8;i=i+2){
  84. temp[i].clip="rect(0 auto auto "+clipleft+")"
  85. }
  86. if (clipright<=0){
  87. if (ns6){
  88. for (i=1;i<=8;i++)
  89. temp[i].display="none"
  90. }
  91. clearInterval(stopit)
  92. }
  93. }
  94. }
  95. function gogo(){
  96. stopit=setInterval("openit()",100)
  97. }
  98. gogo()
  99. </script>
  100. <!-- END OF SCRIPT -->
  101. <!/SCRIPT>
  102.  
  103. <!PREVIEW>
  104. <!-- START OF SCRIPT -->
  105. <!-- Step 1: Insert the following into the <head> section of your page. You can change the color of the strips from blue to another by changing all three instances of the word "blue" to another color name:-->
  106. <style>
  107. <!--
  108. .intro{
  109. position:absolute;
  110. left:0;
  111. top:0;
  112. layer-background-color:blue;
  113. background-color:blue;
  114. border:0.1px solid blue;
  115. z-index:10;
  116. }
  117. -->
  118. </style>
  119. <!--Step 2: Finally, insert the below right after the <body> tags, before anything else. You can adjust the speed in which the curtain "draws' by changing "speed=20" in the second line to another number (greater is faster):-->
  120. <div id="i1" class="intro"></div><div id="i2" class="intro"></div><div id="i3"
  121. class="intro"></div><div id="i4" class="intro"></div><div id="i5" class="intro"></div><div
  122. id="i6" class="intro"></div><div id="i7" class="intro"></div><div id="i8" class="intro"></div>
  123. <script language="JavaScript1.2">
  124.  
  125. /*
  126. Left-Right Stripy Curtain Script- ⌐ Dynamic Drive (www.dynamicdrive.com)
  127. For full source code, 100's more free DHTML scripts, and TOS,
  128. visit http://www.dynamicdrive.com
  129. */
  130.  
  131. var ns4=document.layers?1:0
  132. var ie4=document.all?1:0
  133. var ns6=document.getElementById&&!document.all?1:0
  134.  
  135. var speed=20
  136. var temp=new Array()
  137. var temp2=new Array()
  138. if (ns4){
  139. for (i=1;i<=8;i++){
  140. temp[i]=eval("document.i"+i+".clip")
  141. temp2[i]=eval("document.i"+i)
  142. temp[i].width=window.innerWidth
  143. temp[i].height=window.innerHeight/8
  144. temp2[i].top=(i-1)*temp[i].height
  145. }
  146. }
  147. else if (ie4||ns6){
  148. var clipright=ns6?window.innerWidth:document.body.clientWidth
  149. clipleft=0
  150. for (i=1;i<=8;i++){
  151. temp[i]=ns6?document.getElementById("i"+i).style:eval("document.all.i"+i+".style")
  152. temp[i].width=ns6?window.innerWidth-15:document.body.clientWidth
  153. temp[i].height=ns6?window.innerHeight/8:document.body.offsetHeight/8
  154. temp[i].top=(i-1)*parseInt(temp[i].height)
  155. }
  156. }
  157. function openit(){
  158. window.scrollTo(0,0)
  159. if (ns4){
  160. for (i=1;i<=8;i=i+2)
  161. temp[i].right-=speed
  162. for (i=2;i<=8;i=i+2)
  163. temp[i].left+=speed
  164. if (temp[2].left>window.innerWidth)
  165. clearInterval(stopit)
  166. }
  167. else if (ie4||ns6){
  168. clipright-=speed
  169. for (i=1;i<=8;i=i+2){
  170. temp[i].clip="rect(0 "+clipright+" auto 0)"
  171. }
  172. clipleft+=speed
  173. for (i=2;i<=8;i=i+2){
  174. temp[i].clip="rect(0 auto auto "+clipleft+")"
  175. }
  176. if (clipright<=0){
  177. if (ns6){
  178. for (i=1;i<=8;i++)
  179. temp[i].display="none"
  180. }
  181. clearInterval(stopit)
  182. }
  183. }
  184. }
  185. function gogo(){
  186. stopit=setInterval("openit()",100)
  187. }
  188. gogo()
  189. </script>
  190.  
  191. <!-- END OF SCRIPT -->
  192. <!/PREVIEW>
  193.  
  194. <!RELATED>NONE<!/RELATED>